<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template_dialog.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
		<title>通知公告</title>
		<style>
		.ui-datalist .ui-widget-content{
		  border:none;
		}
		#detailForm ol{
		  padding-left:7px;
		}
		.text-left{
		  display:inline-block;
		  width:70px;
		}
		.content{
		   width:450px;
		   min-height:550px;
		   font-size:16px;
		   margin:10px auto;
		   border:1px solid #DCDCDC;
		   box-shadow:5px 2px 6px #DCDCDC;
		   border-radius:5px;
		   background-color:#FAFAFA;
		   word-wrap:break-word;
		}
		</style>
	</ui:define>
	<ui:define name="content">
		<h:form id="detailForm">
		         <div class="box box-solid" style="background-color:#eff5fb;border-top: 1px solid #aac1de;border-bottom: 1px solid #aac1de;">
				   <div class="box-body">
				      <h4 style="font-weight: bold;">#{noticeView.selectedNotice.title}</h4>
				      <div>
				        <span style="color:#798699;" class="text-left">创建人:</span>
				        <span style="color:#5fa207" >#{noticeView.selectedNotice.createrName}</span>
				      </div>
				      <div>
				        <span style="color:#798699" class="text-left">发布时间:</span>
				        <span>
				             <h:outputText  value="#{noticeView.selectedNotice.publishTime}">
								<f:convertDateTime pattern="yyyy-MM-dd"></f:convertDateTime>
							</h:outputText>
						</span>
				      </div>
				      <div>
				        <span style="color:#798699" class="text-left">有效期至:</span>
				        <span>
				            <h:outputText value="#{noticeView.selectedNotice.validDate}">
								<f:convertDateTime pattern="yyyy-MM-dd"></f:convertDateTime>
							</h:outputText>
						</span>
				      </div>
				   </div>
				</div> 
				<p:outputPanel rendered='#{"".equals(noticeView.selectedNotice.content)}'>
				   <div style="min-height:200px"></div>
				</p:outputPanel>
				<p:outputPanel rendered='#{!"".equals(noticeView.selectedNotice.content)}'>
				   <div class="content">
				      #{noticeView.selectedNotice.content}
				   </div>
				</p:outputPanel>
				<p:outputPanel rendered="#{noticeView.attachments.size() &gt; 0}" style="padding:0px 10px;border-top:1px solid #8F8F8F;border-bottom:1px solid #8F8F8F">
				    <h5 style="font-weight:bold;">附件</h5>
				    <p:dataList var="attachment" value="#{noticeView.attachments}" type="ordered" emptyMessage="" style="padding:0px 35px">
						<div>
							<p:commandLink value="#{attachment.description}" ajax="false" charset="utf-8"
								style="color:blue;text-decoration:underline"
								actionListener="#{noticeView.downLoadFile(attachment)}">
								<p:fileDownload value="#{noticeView.downloadedFile}"></p:fileDownload>
							</p:commandLink>
							<h:outputText value="（" />
							<h:outputText value="#{attachment.uploadDate}">
								<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"></f:convertDateTime>
							</h:outputText>
							<h:outputText value="）" />
							<h:outputText value="下载次数:#{attachment.downloadCount}"></h:outputText>
						</div>
					</p:dataList>
				</p:outputPanel>
				 <!-- <p:panelGrid style="width:100%">
					<p:row>
						<p:column style="width:80px;text-align:right">
							<p:outputLabel value="标题" />
						</p:column>
						<p:column>
							<h:outputText value="#{noticeView.selectedNotice.title}" />
						</p:column>
					</p:row>
					<p:row>
						<p:column style="text-align:right">
							<p:outputLabel value="创建人" />
						</p:column>
						<p:column>
							<h:outputText value="#{noticeView.selectedNotice.createrName}" />
						</p:column>
					</p:row>
					<p:row>
					  <p:column style="text-align:right">
							<p:outputLabel value="发布时间" />
						</p:column>
						<p:column>
							<h:outputText  value="#{noticeView.selectedNotice.publishTime}">
								<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"></f:convertDateTime>
							</h:outputText>
						</p:column>
					</p:row>
					<p:row>
						<p:column style="text-align:right">
							<p:outputLabel value="有效期至" />
						</p:column>
						<p:column>
							<h:outputText value="#{noticeView.selectedNotice.validDate}">
								<f:convertDateTime pattern="yyyy-MM-dd"></f:convertDateTime>
							</h:outputText>
						</p:column>
					</p:row>
					<p:row>
					   <p:column style="text-align:right">
							<p:outputLabel value="发布范围" />
						</p:column>
						<p:column>
							<h:outputText id="scope" value="#{noticeView.selectedNotice.publishScope}" />
						</p:column>
					</p:row>
					<p:row>
						<p:column style="text-align:right">
							<p:outputLabel value="附件" />
						</p:column>
						<p:column>
							<p:dataList var="attachment" value="#{noticeView.attachments}" type="ordered" emptyMessage="">
								<div>
									<p:commandLink value="#{attachment.description}" ajax="false" charset="utf-8"
										style="color:blue;text-decoration:underline"
										actionListener="#{noticeView.downLoadFile(attachment)}">
										<p:fileDownload value="#{noticeView.downloadedFile}"></p:fileDownload>
									</p:commandLink>
									<h:outputText value="（" />
									<h:outputText value="#{attachment.uploadDate}">
										<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"></f:convertDateTime>
									</h:outputText>
									<h:outputText value="）" />
									<h:outputText value="下载次数:#{attachment.downloadCount}"></h:outputText>
								</div>
							</p:dataList>
						</p:column>
					</p:row>
					<p:row>
						<p:column style="width:80px;text-align:right">
							<p:outputLabel value="内容" />
						</p:column>
						<p:column>
							<p:inputTextarea disabled="true" style="opacity:1;width:100%" value="#{noticeView.selectedNotice.content}" />
						</p:column>
					</p:row>
				</p:panelGrid>  -->
		</h:form>
	</ui:define>
</ui:composition>
